home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!news
- From: philma@ix.netcom.com(Phil Majtan)
- Newsgroups: comp.lang.c
- Subject: Re: Trapping Ctrl-Alt-Del
- Date: 20 Apr 1996 22:21:59 GMT
- Organization: Netcom
- Message-ID: <4lbo27$a8a@dfw-ixnews5.ix.netcom.com>
- References: <4kqh5e$fap@ms.slip.net> <4l7n5t$bse@cs3.brookes.ac.uk>
- NNTP-Posting-Host: det-mi4-10.ix.netcom.com
- X-NETCOM-Date: Sat Apr 20 5:21:59 PM CDT 1996
-
- In <4l7n5t$bse@cs3.brookes.ac.uk> Krunchie <95155580@brookes.ac.uk>
- writes:
- >
- >mavrick@slip.net (Mavrick) wrote:
- >>I am running a network of 50 pcs in a class room where students
- always
- >>manage to bypass the provided computer curriculum program by
- rebooting
- >>(Ctrl-Alt-Del) their way out, and fool around the hard disks. Some
- >>also found out that Ctrl-C or Ctrl-break would do the same trick. I
- >>need to fine tune the menu program I wrote 2 years ago and implement
- >>a keyboard trapping algorithm to weed out the Ctrl-Alt-Del and Ctrl-C
- >>/Ctrl-break. Any other keys I can easily trap by scanning for their
- >>scan codes; however, those 3 combos work differrently.
- >>
- >>Could someone write me a short program in C / C++ that would do the
- >>trick. Something as simple as printing 'Hello' every time any of
- >>those combos are pressed. Perhaps I could return the favor by
- >>inviting you for lunch should you ever come across the Bay Area
- >>(Northern California). Thank You. Marvick W C
- >>
- >>mavrick@slip.net
- >>
-
- The only way to trap a ctrl-alt-del is to write an interrupt handler
- that traps the keyboard interrupt. You then have to filter out the
- keystrokes. Since this is not easily done in C, I can't really tell
- you how to go about doing it. It's best left up to someone who can do
- assembly.
- Phil
-
-